<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head th:include="include :: header"></head>
<link href="/css/layui.css" rel="stylesheet">
<style>
	.layui-upload-file{
		visibility: hidden;
	}
	#pic{
		width:140px;
		height:140px;
	}
</style>
<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
						<form class="form-horizontal m-t" id="signupForm">
						<input id="id" name="id" th:value="${receipt.id}"  type="hidden">
							<div class="form-group">	
								<label class="col-sm-3 control-label">收款时间：</label>
								<div class="col-sm-8">
									<input type="text" class="laydate-icon layer-date form-control" id="receiptDate" name="receiptDate" placeholder="请选择收款时间"
										   th:value="${#dates.format(receipt.receiptDate, 'yyyy-MM-dd')}" onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="background-color: #fff;" readonly="readonly"/>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">项目：</label>
								<div class="col-sm-8">
									<select data-placeholder="项目" name="purId" class="form-control chosen-select" tabindex="2" required>
										<option value="">项目</option>
										<option th:each="projectDO : ${projectDOList}" th:value="${projectDO.id}" th:text="${projectDO.name}"
												th:selected="${projectDO.id} == ${receipt.projectId}"></option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">收款方：</label>
								<div class="col-sm-8">
									<select data-placeholder="收款方" name="recriptCompanyid" class="form-control chosen-select-paymentComid" tabindex="2" required>
										<option value="">收款方</option>
										<option th:each="companyDO : ${companyDOList}" th:value="${companyDO.id}" th:text="${companyDO.name}"
												th:selected="${companyDO.id} == ${receipt.recriptCompanyid}"></option>
									</select>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">合同总额：</label>
								<div class="col-sm-8">
									<input id="projectAmount" name="projectAmount" th:value="${receipt.projectAmount}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">收款金额：</label>
								<div class="col-sm-8">
									<input id="receiptAmount" name="receiptAmount" th:value="${receipt.receiptAmount}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">本次收款比例：</label>
								<div class="col-sm-8">
									<input id="receiptScale" name="receiptScale" th:value="${receipt.receiptScale}" class="form-control" type="text">
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">收款凭证：</label>
								<div class="col-sm-8">
									<input id="receiptProof"  name="receiptProof" th:value="${receipt.receiptProof}" class="form-control" type="hidden">
									<button type="button" id="upLoad" class="layui-btn"><i class="fa fa-cloud"></i>上传文件
									</button>
									<img src="" id="pic" th:src="${receipt.receiptProof}" style="width: 120px;height: 100px;">
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-8 col-sm-offset-3">
									<button type="submit" class="btn btn-primary">提交</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
	</div>
	</div>
	<div th:include="include::footer"></div>
	<script src="/js/layui.js"></script>
	<script type="text/javascript" src="/js/appjs/fin/receipt/edit.js"></script>
	<script type="text/javascript" src="/js/plugins/cropper/cropper.min.js"></script>
	<script type="text/javascript" src="/js/plugins/layer/laydate/laydate.js" ></script>
	<script type="text/javascript" src="/js/plugins/distpicker/distpicker.data.min.js"></script>
	<script type="text/javascript" src="/js/plugins/distpicker/distpicker.min.js"></script>
</body>
</html>
